<!-- 引入命名空间，将静态页面转换为动态的视图 -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymelef-extras-springsecurity3">

<head>
	<meta content="text/html;charset=UTF-8"></meta>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
	<meta name="viewport" content="width=device-width,initial-scale=1"></meta>

	<link th:href="@{asset/bootstrap-3.3.7-dist/css/bootstrap.css}" rel="stylesheet"></link>

	<link th:href="@{asset/bootstrap-3.3.7-dist/css/bootstrap-theme.css}" rel="stylesheet"></link>
	<title>登录页面</title>
	<style type="text/css">
		body {
			padding-top: 50px;
		}

		.starter-template {
			padding: 40px 15px;
			text-align: center;
		}
	</style>

</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="#">Spring security演示</a>
			</div>
			<div id="navbar" class="collapse navbar-collapse">
				<ul class="nav navbar-nav">
					<li class="">
						<a th:href="@{/}">首页</a>
					</li>
				</ul>
			</div>
		</div>
	</nav>
	<div class="container">
		<div class="starter-template">
			<div th:if="${param.error}" class="bg-danger">无效的账号和密码</div>
			<div th:if="${param.logout}" class="bg-warning">你已注销。</div>
			<form action="login.do" th:action="@{/login.do}"  method="post">
				<div class="form-group">
					<label for="username">账号:
						<input type="text" name="username" class="form-control" placeholder="账号"></input>
					</label>
				</div>
				<div class="form-group">
					<label for="password">密码:
						<input type="password" name="password" class="form-control" placeholder="密码"></input>
					</label>
				</div>
				<div>
					<input type="submit" value="登录" class="btn btn-success"></input>
				</div>
			</form>
		</div>

	</div>


</body>
<script type="text/javascript" th:src="@{asset/jquery-3.2.1/jquery-3.2.1.js}"></script>
<script type="text/javascript" th:src="@{asset/bootstrap-3.3.7-dist/js/bootstrap.js}"></script>

</html>